package Java031;

import java.util.Arrays;
import java.util.Scanner;

class Rectangle{
	private int width;
	private int length;
	public Rectangle(int width,int length){
		this.width=width;
		this.length=length;
	}
	public int getPerimeter(){
		return 2*(width+length);
	}
	public int getArea(){
		return width*length;
	}

	public String toString(){
		return "Rectangle [width=" + width + ", length=" + length + "]";
	}
}
class Circle{
	private int radius;
	public Circle(int radius){
		this.radius=radius;
	}
	
	public int getPerimeter(){
		return (int) (2*radius*Math.PI);
	}
	public int getArea(){
		return (int) (Math.PI*radius*radius);
	}

	public String toString(){
		return "Circle [radius=" + radius + "]";
	}
}
public class Java0303 {
	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		Rectangle[] rectangles=new Rectangle[2];
		Circle[] circles=new Circle[2];
		for(int i=0;i<2;i++){
			rectangles[i]=new Rectangle(in.nextInt(),in.nextInt());
		}
		for(int i=0;i<2;i++){
			circles[i]=new Circle(in.nextInt());
		}
		System.out.println(rectangles[0].getPerimeter()+rectangles[1].getPerimeter()+circles[0].getPerimeter()+circles[1].getPerimeter());
		System.out.println(rectangles[0].getArea()+rectangles[1].getArea()+circles[0].getArea()+circles[1].getArea());
		System.out.println(Arrays.deepToString(rectangles));
		System.out.println(Arrays.deepToString(circles));
	}
}